1. Field of the Invention
The present invention relates to a sample rate converter for use with digital-to-analog conversion circuits and the like.
2. Description of the Related Art
In general, in the descriptions that follow, I will italicize the first occurrence of each special term of art that should be familiar to those skilled in the art of integrated circuits (“ICs”) and systems. In addition, when I first introduce a term that I believe to be new or that I will use in a context that I believe to be new, I will bold the term and provide the definition that I intend to apply to that term. In addition, throughout this description, I will sometimes use the terms assert and negate when referring to the rendering of a signal, signal flag, status bit, or similar apparatus into its logically true or logically false state, respectively, and the term toggle to indicate the logical inversion of a signal from one logical state to the other. Alternatively, I may refer to the mutually exclusive boolean states as logic_0 and logic_1. Of course, as is well known, consistent system operation can be obtained by reversing the logic sense of all such signals, such that signals described herein as logically true become logically false and vice versa. Furthermore, it is of no relevance in such systems which specific voltage levels are selected to represent each of the logic states.
Hereinafter, when I refer to a facility I mean a circuit or an associated set of circuits adapted to perform a particular function regardless of the physical layout of an embodiment thereof. Thus, the electronic elements comprising a given facility may be instantiated in the form of a hard macro adapted to be placed as a physically contiguous module, or in the form of a soft macro the elements of which may be distributed in any appropriate way that meets speed path requirements. In general, electronic systems comprise many different types of facilities, each adapted to perform specific functions in accordance with the intended capabilities of each system. Depending on the intended system application, the several facilities comprising the hardware platform may be integrated onto a single IC, or distributed across multiple ICs. Depending on cost and other known considerations, the electronic components, including the facility-instantiating IC(s), may be embodied in one or more single- or multi-chip packages. However, unless I expressly state to the contrary, I consider the form of instantiation of any facility that practices my invention as being purely a matter of design choice.
Shown in FIG. 1 is a typical general purpose computer system 10. In particular, in recently-developed battery-powered mobile systems, such as smart-phones and the like, many of the discrete components typical of desktop or laptop devices illustrated in FIG. 1 are integrated into a single integrated circuit chip.
Shown by way of example in FIG. 2 is one embodiment of a single-chip audio coder/decoder (“CODEC”) 12 comprising: a plurality of digital modules; and a plurality of analog modules. In this embodiment, CODEC 12 includes a Serial Data Interface facility adapted to send data to, and receive digital data from, the system 10; a Digital Phase-Locked Loop (“DPLL”) facility adapted to determine the timing and rate relationship between two asynchronous data streams; a Configuration Memory and Control facility adapted to control which facilities are used and how, in accordance with configuration and control information received from the system 10; a Digital Signal Processor (“DSP”) facility adapted to perform various data processing activities in accordance with a stored computer program; and a Data Memory facility adapted to store, as required, audio data flowing from the system 10 to the audio output devices. I may expand on the functionality of certain of these facilities as I now explain the method of operation of my invention and embodiments thereof.
Audio DACs commonly operate at oversample rates of 64, 80, 128, 160 or similar multiples of the input sample rate. Often the input data stream is interpolated to 4 or 8 times the input sample rate using a high quality digital filter to remove images, and then each sample is held a constant number of cycles at the oversample rate. The sample and hold facility produces images that are only partially filtered, but these images are outside the audio band, so are not a problem for most applications. Some DACs have incorporated sample rate conversion by allowing the oversample rate to be a non-integer multiple of the input sample rate. One known method to accomplish this is to vary the number of cycles at the output oversample rate that each 4× or 8× sample is held. For example, the system could alternate between holding each sample 8 or 9 cycles. This works well if the created images do not fall in the audio band, but will not produce good results for asynchronous sample rate conversion.
A second known method is to use linear interpolation to produce the oversampled data from the 4× or 8× data stream. This method can be used successfully even for asynchronous sample rate conversion if the oversample rate is a high enough multiple of the input sample rate. For example, if the oversample rate is about 128 times the input sample rate, and about 16 times the high quality 8× interpolated data stream, any images aliased into the audio band will be suppressed by at least 100 dB, and each doubling of the oversample rate will improve the image rejection by 12 dB. But this method will not produce good enough results for an audio DAC at an oversample rate of only about 64 times the input sample rate.
An improvement over the second known method is to use linear interpolation to produce a single interpolated sample of the oversampled data at each transition of the 8× interpolated data, and to hold the 8× sample in between transitions. This method achieves equivalent attenuation of aliased images in the baseband region as the second method, but with fewer calculations, for example, 1/16 the number of interpolations at about a 128× oversample rate. I invented this method in 1999 while employed by SigmaTel, Inc. (Austin, Tex., USA), and at the present time, this method is, I believe, in the public domain.
What is needed is a sample rate converter that achieves superior oversample rate conversion more efficiently and effectively than the known art.